package com.ruicar.afs.cloud.afscase.channel.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.ruicar.afs.cloud.afscase.channel.entity.ChannelQuotaInfo;
import com.ruicar.afs.cloud.afscase.channel.vo.ChannelLimitTakeUpOrLeaseVo;
import com.ruicar.afs.cloud.common.core.util.IResponse;

import java.util.List;

/**
 * @author limingzhi
 * @version 1.0
 * @date 2020/6/9 11:13
 */
public interface ChannelQuotaInfoService extends IService<ChannelQuotaInfo> {

    /**
     * 渠道额度的占用与释放
     *
     * @param vo
     * @param quotaInfoList
     */
    void updateQuotaLimit(ChannelLimitTakeUpOrLeaseVo vo, List<ChannelQuotaInfo> quotaInfoList);


    /**
     * 同步临时额度数据到渠道服务
     *
     * @param quotaInfoList
     * @return
     */
    public IResponse synchronousLimitToChannel(List<ChannelQuotaInfo> quotaInfoList);

    /*
    *额度重算
    * */
    void quotaRecompute(List<Long> channelIds, String businessType);
}
